//
//  PostViewController.h
//  Gruphoto
//
//  Created by Thao Nguyen Huy on 1/4/13.
//  Copyright (c) 2013 CNC Software. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ODRefreshControl/ODRefreshControl.h"

@class Event;

@interface PostViewController : GruphotoViewController <UISearchBarDelegate, UITableViewDataSource, UITableViewDelegate, ASIHTTPRequestDelegate> {
    UISearchBar *postSearchBar;
    UITableView *postTableView;
    UIView *maskView;
    BOOL checkForRefresh;
	BOOL isRefreshing;
    ODRefreshControl *refreshControl;
    
    NSMutableArray *postedEvents;
    NSMutableArray *eventsNeedDisplay;
    Event *selectedEvent;
}

@property (nonatomic, retain) IBOutlet UISearchBar *postSearchBar;
@property (nonatomic, retain) IBOutlet UITableView *postTableView;
@property (nonatomic, retain) IBOutlet UIView *maskView;
@property (nonatomic, retain) ODRefreshControl *refreshControl;

@property (nonatomic, retain) NSMutableArray *postedEvents;
@property (nonatomic, retain) NSMutableArray *eventsNeedDisplay;
@property (nonatomic, retain) Event *selectedEvent;

- (IBAction)mapButtonPressed:(id)sender;
- (IBAction)maskViewTapped:(id)sender;

- (void)getPostedEvents;
// for searching
- (void)resetSearch;
- (void)handleSearchForTerm:(NSString *)searchTerm;

@end
